/**
 * 
 */
package mblog.web.controller.front;

import javax.servlet.http.HttpServletRequest;

import mblog.web.controller.BaseController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author langhsu
 * 修改logout逻辑，返回是否注销成功
 * @author songdragon 
 *
 */
@Controller
public class LogoutController extends BaseController {

	@RequestMapping("/logout")
	@ResponseBody
	public String logout(HttpServletRequest request) {
		putProfile(null);
		session.invalidate();
		return "{\"retCode\":0,\"url\":\"/\"}";
	}

}
